home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 February / macformat-047.iso / Demos / Simpsons Cartoon Studio™ Demo / Simpsons / Support / dlogdata / status.Dxr / 00006_main movie script.ls < prev    next >
Encoding:
Text File  |  1996-08-16  |  2.0 KB  |  63 lines

  1. global statusBox, statusWindow, PCflag, curPercentage
  2.  
  3. on update thePercentage
  4.   set curPercentage to curPercentage + 1
  5.   if curPercentage > 100 then
  6.     set curPercentage to 100
  7.   end if
  8.   set statusBoxBackSprite to 1
  9.   set statusBarSprite to 2
  10.   set statusBoxSprite to 3
  11.   set statusBoxMessage to 4
  12.   set maxStatusBarWidth to 360
  13.   set statusBarWidth to maxStatusBarWidth * (curPercentage * 0.01)
  14.   repeat while the width of sprite statusBarSprite < statusBarWidth
  15.     set the width of sprite statusBarSprite to the width of sprite statusBarSprite + 1
  16.     if the width of sprite statusBarSprite >= statusBarWidth then
  17.       exit repeat
  18.     end if
  19.     updateStage()
  20.   end repeat
  21.   set the width of sprite statusBarSprite to statusBarWidth
  22.   updateStage()
  23.   if thePercentage = 100 then
  24.     set statusBarWidth to maxStatusBarWidth * (thePercentage * 0.01)
  25.     repeat while the width of sprite statusBarSprite < statusBarWidth
  26.       set the width of sprite statusBarSprite to the width of sprite statusBarSprite + 1
  27.       if the width of sprite statusBarSprite >= statusBarWidth then
  28.         exit repeat
  29.       end if
  30.       updateStage()
  31.     end repeat
  32.     set the width of sprite statusBarSprite to statusBarWidth
  33.     updateStage()
  34.   end if
  35. end
  36.  
  37. on displayMessage theMessage
  38.   set the text of field "status box message" to theMessage
  39.   set curPercentage to 1
  40. end
  41.  
  42. on startMovie
  43.   set the exitLock to 1
  44.   set the modal of statusWindow to 1
  45.   set statusBoxBackSprite to 1
  46.   set statusBarSprite to 2
  47.   set statusBoxSprite to 3
  48.   set statusBoxMessage to 4
  49.   repeat with theSprite = 1 to 4
  50.     puppetSprite(theSprite, 1)
  51.   end repeat
  52.   if PCflag then
  53.     set the textFont of field "status box message" to "Arial"
  54.     set the textSize of field "status box message" to 12
  55.     set the textStyle of field "status box message" to "bold"
  56.   else
  57.     set the textFont of field "status box message" to "Geneva"
  58.     set the textSize of field "status box message" to 14
  59.     set the textStyle of field "status box message" to "bold"
  60.   end if
  61.   set the stretch of sprite statusBarSprite to 1
  62. end
  63.